-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Allow conditional creation of node groups to be set within node group definitions #1848
Conversation
Sorry for my confusion, this is my first PR. As of the contributing guidelines https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/.github/CONTRIBUTING.md "improvement" is a valid PR title but the CI job does not allow this value. Should I alternatively use "feat"? |
@@ -331,6 +331,8 @@ module "self_managed_node_group" { | |||
|
|||
for_each = { for k, v in var.self_managed_node_groups : k => v if var.create } | |||
|
|||
create = try(each.value.create, true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested this yet, but any changes we make like this should also be propagated to the EKS managed node group and Fargate profile definitions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I added the feature to the managed node groups and fargate profiles but did not test it, because I am not using them anywhere
and regarding your title, yes lets just use |
…ged_node_groups map entries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, one last change - lets change the title to feat: Allow conditional creation of node groups to be set within node group definitions
- thanks for the PR @PhilippMT !
should be good to go with title change @antonbabenko 👍🏽
## [18.5.0](v18.4.1...v18.5.0) (2022-02-08) ### Features * Allow conditional creation of node groups to be set within node group definitions ([#1848](#1848)) ([665f468](665f468))
This PR is included in version 18.5.0 🎉 |
## [18.5.0](terraform-aws-modules/terraform-aws-eks@v18.4.1...v18.5.0) (2022-02-08) ### Features * Allow conditional creation of node groups to be set within node group definitions ([#1848](terraform-aws-modules/terraform-aws-eks#1848)) ([581319f](terraform-aws-modules/terraform-aws-eks@581319f))
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
Motivation and Context
We are using the same manifest for different stages. Some resources are created conditionally based on variables set for a specific stage. We defined multiple self managed node groups in the map self_managed_node_group, but not all of them are relevant for all stages. We would like to be able to create some of the entries conditionally on the "create" variable defined by the self_managed_node_group submodule.
Breaking Changes
How Has This Been Tested?
I tested three different scenarios